home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / ispell31.lha / ispell-3.1.18src / makedict.sh < prev    next >
Text File  |  1994-01-25  |  3KB  |  80 lines

  1. : Use /bin/sh
  2. #
  3. # $Id: makedict.sh,v 1.9 1994/01/25 07:11:53 geoff Exp $
  4. #
  5. # Copyright 1987, 1988, 1989, 1992, 1993, Geoff Kuenning, Granada Hills, CA
  6. # All rights reserved.
  7. #
  8. # Redistribution and use in source and binary forms, with or without
  9. # modification, are permitted provided that the following conditions
  10. # are met:
  11. #
  12. # 1. Redistributions of source code must retain the above copyright
  13. #    notice, this list of conditions and the following disclaimer.
  14. # 2. Redistributions in binary form must reproduce the above copyright
  15. #    notice, this list of conditions and the following disclaimer in the
  16. #    documentation and/or other materials provided with the distribution.
  17. # 3. All modifications to the source code must be clearly marked as
  18. #    such.  Binary redistributions based on modified source code
  19. #    must be clearly marked as modified versions in the documentation
  20. #    and/or other materials provided with the distribution.
  21. # 4. All advertising materials mentioning features or use of this software
  22. #    must display the following acknowledgment:
  23. #      This product includes software developed by Geoff Kuenning and
  24. #      other unpaid contributors.
  25. # 5. The name of Geoff Kuenning may not be used to endorse or promote
  26. #    products derived from this software without specific prior
  27. #    written permission.
  28. #
  29. # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  30. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  31. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  32. # ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  33. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  34. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  35. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  36. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  37. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  38. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  39. # SUCH DAMAGE.
  40. #
  41. #    Make a beginning dictionary file for ispell, using an existing
  42. #    speller.
  43. #
  44. #    Usage:
  45. #
  46. #    makedict file-list
  47. #
  48. #    The specified files are collected, split into words, and run through
  49. #    the system speller (usually spell(1)).  Any words that the speller
  50. #    accepts will be written to the standard output for use in making
  51. #    an ispell dictionary.  Usually, you will want to run the output
  52. #    of this script through "munchlist" to get a final dictionary.
  53. #
  54. # $Log: makedict.sh,v $
  55. # Revision 1.9  1994/01/25  07:11:53  geoff
  56. # Get rid of all old RCS log lines in preparation for the 3.1 release.
  57. #
  58. #
  59.  
  60. # This program must produce a list of INCORRECTLY spelled words on standard
  61. # output, given a list of words on standard input.  If you don't have a
  62. # speller, but do have a lot of correctly-spelled files, try /bin/true.
  63. #
  64. SPELLPROG="${SPELLPROG-spell}"
  65.  
  66. TMP=${TMPDIR-/tmp}/mkdict$$
  67.  
  68. case "$#" in
  69.     0)
  70.     set X -
  71.     shift
  72.     ;;
  73. esac
  74.  
  75. trap "/bin/rm ${TMP}; exit 1" 1 2 15
  76.  
  77. cat "$@" | deroff | tr -cs "[A-Z][a-z]'" '[\012*]' | sort -uf -o ${TMP}
  78. $SPELLPROG < ${TMP} | comm -13 - ${TMP}
  79. /bin/rm ${TMP}
  80.